import React from "react";
import { RoutesType } from "../types/routes";

import Core from "../pages/index";
import Home from "../pages/Home";
import Login from "../pages/Login";
import { Navigate } from "react-router-dom";

const routes: RoutesType[] = [
  {
    path: "/",
    name: "/",
    element: <Core></Core>,
    children: [
      {
        path: "/login",
        name: "Login",
        element: <Login />,
        // children:[]
      },
      {
        path: "/home",
        name: "Home",
        element: <Home />,
        // children:[]
      },
      {
        path: "/",
        name: "/",
        element: <Navigate to={"/login"}></Navigate>,
      },
    ],
  },
];

export default routes;
